Fix spec-drift false positives from date-only description changes#49
Conversation
…ift workflow Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/8f51ccaf-920d-4a3b-b4c5-bf9ae3d2b828 Co-authored-by: splch <25377399+splch@users.noreply.github.com>
splch
left a comment
There was a problem hiding this comment.
the git diff needs to be as small as possible
…ting Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/fb5a8995-946b-4ab5-929c-5ace34c64335 Co-authored-by: splch <25377399+splch@users.noreply.github.com>
Reverted the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
splch
left a comment
There was a problem hiding this comment.
ignoring or removing the date from the openapi spec should be a short addition to the existing one-liner. iterate a bit on your implementation until it's as short and simple as possible.
Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/b09e6ba6-bdaf-42b5-83b2-c92226fa05b6 Co-authored-by: splch <25377399+splch@users.noreply.github.com>
Done in e77159e. Replaced the multi-line |
splch
left a comment
There was a problem hiding this comment.
great that's closer! thank you. now make it DRY
Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/4f89c827-e9f2-42df-83ba-36e4f7cdfb67 Co-authored-by: splch <25377399+splch@users.noreply.github.com>
Done in c5bd46a. Extracted the repeated pipeline into a one-line |
splch
left a comment
There was a problem hiding this comment.
use perl and follow existing patterns and styles to ensure the pr is short and simple.
Agent-Logs-Url: https://github.com/ionq/ionq-core-python/sessions/d9b96e03-67b9-4cda-9f37-b8d80d6548ac Co-authored-by: splch <25377399+splch@users.noreply.github.com>
Done in a5f2fd4 — swapped |
splch
left a comment
There was a problem hiding this comment.
can you use jq -S instead of python's json.tool? now try to make these lines as short as possible.
splch
left a comment
There was a problem hiding this comment.
replace the gsub with del(.info.description)
natestemen
left a comment
There was a problem hiding this comment.
LGTM! The description only contains the date or is there other info that is also being dropped?
|
@natestemen dropping the |
Summary
The weekly spec-drift workflow was firing on a date-only change in
info.description(*Last updated: May 15, 2026*→May 22, 2026), with no actual API surface changes.spec-drift.yml— adds anorm()shell helper that runsjq -S 'del(.info.description)'to sort keys and drop the description field in one step, then uses<(norm openapi.json)and<(norm /tmp/latest-spec.json)in the existingdiffone-liner. Date bumps (and any other description-only changes) no longer open false-positive issues; real schema/endpoint changes still trigger the alert.openapi.jsonis left unchanged — since the workflow now ignores description-only diffs, updating the vendored date is unnecessary and keeps the diff minimal.Test plan
Verified the
norm()logic in isolation: date-only deltas produce no diff; non-date changes (e.g. title rename) still surface correctly. All 242 unit tests pass at 100% branch coverage.Important
Most code in
ionq_core/is auto-generated and overwritten on regeneration.See CONTRIBUTING.md for which files are safe to edit.